/*
 * @Author: lixiaowei
 * @Date: 2021-04-06 17:20:25
 * @LastEditors: lixiaowei
 * @LastEditTime: 2021-04-06 18:11:15
 * @Description: file content
 * @FilePath: /heima-bli/枚举/enum.cpp
 */
#include <iostream>
using namespace std;

int main()
{
  enum wT{Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday};  // 声明wT类型
  wT weekday;

  weekday = Monday;
  weekday = Tuesday;
  // weekday = 1;  // 不能直接赋值int值，只能赋值成wT定义好的类型值 error: assigning to 'wT' from incompatible type 'int'
  weekday = wT(1);  // 强制类型转换进行赋值，不推荐
  cout << weekday << endl;  // 1

  // Monday = 0; // 类型值不能做左值

  int a = Wednesday;

  cout << a << endl;

  return 0;
}